package khs.java_ip2host.main.java;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws IOException
    {
        System.out.print("input ip: ");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String ip_addr = br.readLine();
        
        InetAddress inetAddress = InetAddress.getByName(ip_addr);
        String host_name = inetAddress.getHostName();
        
        System.out.println(host_name);
    }
}
